#!/bin/bash

path=$(pwd)

#registry
docker run -dti --name registry \
--privileged=true \
--restart=always \
-p 8443:443 \
-v $path/certs:/certs \
-v $path/registry:/var/lib/registry \
-e REGISTRY_HTTP_ADDR=0.0.0.0:443 \
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/server-cert.pem \
-e REGISTRY_HTTP_TLS_KEY=/certs/server-key.pem \
registry:2

# 验证是否搭建成功(默认是没有任何镜像，下面push一个镜像来验证)
#https://sylar.host:8443/v2
#https://sylar.host:8443/v2/_catalog

#registry-web
docker run -dti --name registry-web \
--restart=always \
--link registry \
-p 8500:8080 \
-e registry_url=https://sylar.host:8443/v2 \
-e registry_name=sylar.host:8443 \
hyper/docker-registry-web





